package com.fangwei.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/hello")
public class HelloController {

    @RequestMapping("/hw")
    @ResponseBody
    public String index() throws Exception{
    	System.out.println(1/0);
        return "Hello World";
    }
    
    @RequestMapping("/json")
    @ResponseBody
    public String index2() throws Exception{
    	return "发生错误咯！";
    }
    
    @RequestMapping("/index")
    @ResponseBody
    public String index3() {
        return "index";
    }
}